// Package users_1 模型
package users_1

import (
	"gohub/app/models"
	"gohub/pkg/database"
	"time"
)

type Users1 struct {
	models.BaseModel
	ID           uint64
	Name         string
	Email        string
	Phone        string
	Password     string
	CreatedAt    time.Time
	UpdatedAt    time.Time
	City         string
	Introduction string
	Avatar       string

	models.CommonTimestampsField
}

func (users1 *Users1) Create() {
	database.DB.Create(&users1)
}

func (users1 *Users1) Save() (rowsAffected int64) {
	result := database.DB.Save(&users1)
	return result.RowsAffected
}

func (users1 *Users1) Delete() (rowsAffected int64) {
	result := database.DB.Delete(&users1)
	return result.RowsAffected
}
